package com.xuecheng.media.domain.model;

import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Author: LiJunXi
 * @Description:
 * @Date: 2024-08-04  13:49
 */
@Data
public class FileUploadDo {

    /**
     * 文件名称
     */
    private String filename;

    /**
     * 文件类型（文档，音频，视频）
     */
    private String fileType;
    /**
     * 文件大小
     */
    private Long fileSize;

    /**
     * 标签
     */
    private String tags;

    /**
     * 上传人
     */
    private String username;

    /**
     * 备注
     */
    private String remark;

    public static FileUploadDo getDefaultFile(Long fileSize, String fileName) {
        FileUploadDo fileUploadDo = new FileUploadDo();
        fileUploadDo.setFileSize(fileSize);
        fileUploadDo.setFilename(fileName);

        return fileUploadDo;
    }
}
